package com.dianban.dao;

import com.dianban.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface UserDao {

    User findById(@Param("id") Long  id);

    User findByMobile(@Param("mobile") String  mobile);

    List<User> findChildren(@Param("id") Long  id);

    int updateCoupon(@Param("coupon") BigDecimal coupon,@Param("energy") BigDecimal energy, @Param("id")Long id);

    int updateMoney(@Param("money") BigDecimal money, @Param("id")Long id);

    int updateGoldBean(@Param("goldBean") BigDecimal goldBean, @Param("id")Long id);

    int updateFacePayCommission(@Param("facePayCommission") BigDecimal facePayCommission, @Param("id")Long id);

    int subFacePayCommission(@Param("facePayCommission") BigDecimal facePayCommission, @Param("id")Long id);

    void updateOpenid(@Param("openid")String openid, @Param("id")String id);

    List<User> findFirstChildren(@Param("id") Long id);
}
